from rest_framework_jwt.views import obtain_jwt_token
from django.conf.urls import url

from . import views


urlpatterns = [
    # 验证用户名是否已存在
    url(r'^usernames/(?P<username>\w{5,20})/count/$', views.UsernameCountView.as_view()),
    url(r'^mobiles/(?P<mobile>1[3-9]\d{9})/count/$', views.MobileCountView.as_view()),

    # 这是注册功能的路由
    url(r'^users/$', views.UserView.as_view()),

# JWT登录
    url(r'^authorizations/$', obtain_jwt_token),
    #　用户个人中心
    url(r'^user/$', views.UserDetailView.as_view()),
# 设置用户邮箱
    url(r'^email/$', views.EmailView.as_view()),
]